package KK.Tip
{
	import KK.Controls.Tips.ExTip;
	import KK.net.ResourceManager;
	
	import flash.events.Event;
	
	import mx.core.Singleton;
	
	public class GlobalTip extends ExTip
	{
		
		static private var instance:GlobalTip;
		public function GlobalTip(singleton:Singleton)
		{
			//TODO: implement function
			LogInfo("afwe");
			super();
			if(instance){
				throw new Error("this singleton class,pless using Instance get instance.");
			}
			instance=this;
			init();
		}
		/**
		 * 初始化  
		 * 
		 */
		private function init():void{
			ResourceManager.AddSwfLoader("assets/tip.png",onLoaded);
		}
		/**
		 * 加载完毕  
		 * @param event
		 * 
		 */
		private function onLoaded(event:Event):void{
			Skin=event.target.content.bitmapData;
		}
		
		
		
		/**
		 * 获取单例  
		 * @return 
		 * 
		 */
		static public function get Instance():GlobalTip{
			if(!instance){
				new GlobalTip(new Singleton);
			}
			return instance;
		}
		
	}
}


class Singleton{
	
}